package com.university.evaluation.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@TableName("t_user") // 假设您的用户表名为 t_user
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID (Long, 自增) - 系统的唯一标识，无业务含义
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 学号/工号 (String) - 用于登录的业务标识，必须唯一
     */
    private String studentId;

    /**
     * 用户名/昵称 (String) - 用于显示，可由用户自定义修改
     */
    @TableField(updateStrategy = FieldStrategy.NOT_NULL)
    private String username;

    /**
     * 真实姓名 (String) - 通常由管理员录入，不可修改
     */
    @TableField(updateStrategy = FieldStrategy.NOT_NULL)
    private String realName;

    /**
     * 密码 (String) - 存储加密后的哈希值
     */
    @TableField(updateStrategy = FieldStrategy.NOT_NULL)
    private String password;

    /**
     * 角色ID (Long) - 外键，关联 t_role 表
     */
    @TableField(updateStrategy = FieldStrategy.NOT_NULL)
    private Long roleId;

    /**
     * 邮箱 (String)
     */
    @TableField(updateStrategy = FieldStrategy.NOT_NULL)
    private String email;

    /**
     * 电话 (String)
     */
    @TableField(updateStrategy = FieldStrategy.NOT_NULL)
    private String phone;

    /**
     * 所属学院ID (Long) - 假设学院有独立的表
     */
    @TableField(updateStrategy = FieldStrategy.NOT_NULL)
    private Long collegeId;

    /**
     * 学院名称 (String)
     */
    @TableField(updateStrategy = FieldStrategy.NOT_NULL)
    private String college;

    /**
     * 专业 (String)
     */
    @TableField(updateStrategy = FieldStrategy.NOT_NULL)
    private String major;

    /**
     * 年级 (String)
     */
    @TableField(updateStrategy = FieldStrategy.NOT_NULL)
    private String grade;

    /**
     * 班级名称 (String)
     */
    @TableField(updateStrategy = FieldStrategy.NOT_NULL)
    private String className;

    /**
     * 性别 (String) - 男/女
     */
    @TableField(updateStrategy = FieldStrategy.NOT_NULL)
    private String gender;

    /**
     * 出生日期 (LocalDateTime)
     */
    @TableField(updateStrategy = FieldStrategy.NOT_NULL)
    private LocalDateTime birthDate;

    /**
     * 地址 (String)
     */
    @TableField(updateStrategy = FieldStrategy.NOT_NULL)
    private String address;

    /**
     * 头像URL (String)
     */
    @TableField(updateStrategy = FieldStrategy.NOT_NULL)
    private String avatar;

    /**
     * 邮箱验证状态 (Boolean) - true:已验证, false:未验证
     */
    @TableField(updateStrategy = FieldStrategy.NOT_NULL)
    private Boolean emailVerified;

    /**
     * 电话验证状态 (Boolean) - true:已验证, false:未验证
     */
    @TableField(updateStrategy = FieldStrategy.NOT_NULL)
    private Boolean phoneVerified;

    /**
     * 状态 (Integer) - 0:禁用, 1:启用
     */
    @TableField(updateStrategy = FieldStrategy.NOT_NULL)
    private Integer status;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    private LocalDateTime updateTime;
}